<extend name="Public/base" />
<block name="body">
  <!-- 标题栏 -->
  
  <div class="main-title">
    <h2>公众号组管理</h2>
  </div>
  
  <!-- 数据列表 -->
  <div class="data-table table-striped">
    <table border="1" cellspacing="0" cellpadding="4" align="center" width="80%">
      <thead>
        <tr>
          <th width="120">节点名称</th>
          <th width="500">接口名称 </th>
          <th>普通订阅号 </th>
          <th>微信认证订阅号 </th>
          <th>普通服务号 </th>
          <th>微信认证服务号 </th>
        </tr>
      </thead>
      <tbody>
      <volist name="list_data" id="vo">
        <tr>
          <td>{$vo.name}</td>
          <td>{$vo.title}</td>
          <td><input class="auth_rules rules_row" type="checkbox" name="type_0|{$vo.name}" <eq name="vo.type_0" value="1">checked="checked"</eq> value="1"/></td>
          <td><input class="auth_rules rules_row" type="checkbox" name="type_1|{$vo.name}" <eq name="vo.type_1" value="1">checked="checked"</eq> value="1"/></td>
          <td><input class="auth_rules rules_row" type="checkbox" name="type_2|{$vo.name}" <eq name="vo.type_2" value="1">checked="checked"</eq> value="1"/></td>
          <td><input class="auth_rules rules_row" type="checkbox" name="type_3|{$vo.name}" <eq name="vo.type_3" value="1">checked="checked"</eq> value="1"/></td>
        </tr>
        </volist>
        
      </tbody>
    </table>
  </div>
</block>
<block name="script">
  <script type="text/javascript" charset="utf-8">
    //导航高亮
    highlight_subnav('{:U('AuthManager/wecaht')}');
	
	$(function(){
    $(".rules_row").change(function() {
		var n = $(this).attr('name');
		var v = $(this).is(':checked');
        $.post("{:U('set_switch')}", {name:n,val:v},function(data){
			if(data.status){
				updateAlert(data.info ,'alert-success');
			}else{
			    updateAlert(data.info);
			}
			
			setTimeout(function(){
				$('#top-alert').find('button').click();
			},1500);
		});
    });
}); 
</script>
</block>